import addPhotosWatermarkers from './addPhotosWatermarkers';
import webpicture from './webpicture';
import webgetlocal from './webgetlocal';

const webgetwatermakerphotos = async (key?: string) => {
	const img = await webpicture();
	const local = (await webgetlocal(key)) as {
		address: string;
		longitude: number;
		latitude: number;
	};
	const waterMark = await addPhotosWatermarkers({
		imgUrl: img as string,
		adress: local.address,
		x: local.longitude,
		y: local.latitude,
	});
	return waterMark;
};

export default webgetwatermakerphotos;
